/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('fcc', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model AddAbilityByDeviceIdRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  eventSort?: string(name='EventSort'),
  eventName?: string(name='EventName'),
  eventConfig?: string(name='EventConfig'),
  status?: string(name='Status'),
  edgeId?: string(name='EdgeId'),
  XScale?: float(name='XScale'),
  YScale?: float(name='YScale'),
}

model AddAbilityByDeviceIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddAbilityByDeviceIdResponse = {
  headers: map[string]string(name='headers'),
  body: AddAbilityByDeviceIdResponseBody(name='body'),
}

async function addAbilityByDeviceIdWithOptions(request: AddAbilityByDeviceIdRequest, runtime: Util.RuntimeOptions): AddAbilityByDeviceIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddAbilityByDeviceId', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addAbilityByDeviceId(request: AddAbilityByDeviceIdRequest): AddAbilityByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAbilityByDeviceIdWithOptions(request, runtime);
}

model AddCameraRequest {
  corpId?: string(name='CorpId'),
  streamUrl?: string(name='StreamUrl'),
  edgeDeviceId?: string(name='EdgeDeviceId'),
  name?: string(name='Name'),
  status?: string(name='Status'),
  detailJson?: string(name='DetailJson'),
}

model AddCameraResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddCameraResponse = {
  headers: map[string]string(name='headers'),
  body: AddCameraResponseBody(name='body'),
}

async function addCameraWithOptions(request: AddCameraRequest, runtime: Util.RuntimeOptions): AddCameraResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddCamera', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addCamera(request: AddCameraRequest): AddCameraResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCameraWithOptions(request, runtime);
}

model AddChannelRequest {
  gbId?: string(name='GbId'),
  clientToken?: string(name='ClientToken'),
}

model AddChannelResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddChannelResponse = {
  headers: map[string]string(name='headers'),
  body: AddChannelResponseBody(name='body'),
}

async function addChannelWithOptions(request: AddChannelRequest, runtime: Util.RuntimeOptions): AddChannelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddChannel', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addChannel(request: AddChannelRequest): AddChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return addChannelWithOptions(request, runtime);
}

model AddDeviceAbilityRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  abilityType?: string(name='AbilityType'),
  abilityName?: string(name='AbilityName'),
  orderId?: string(name='OrderId'),
  configInfo?: string(name='ConfigInfo'),
  clientToken?: string(name='ClientToken'),
  scheduleType?: string(name='ScheduleType'),
  scheduleCycleDate?: string(name='ScheduleCycleDate'),
  scheduleTimes?: map[string]any(name='ScheduleTimes'),
  isPolling?: string(name='IsPolling'),
  overallExecutionTime?: string(name='OverallExecutionTime'),
  sliceExecutionTime?: string(name='SliceExecutionTime'),
  computeFrequencyType?: string(name='ComputeFrequencyType'),
  algorithmId?: string(name='AlgorithmId'),
  validYear?: int32(name='ValidYear'),
  validMonth?: int32(name='ValidMonth'),
  validDay?: int32(name='ValidDay'),
}

model AddDeviceAbilityShrinkRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  abilityType?: string(name='AbilityType'),
  abilityName?: string(name='AbilityName'),
  orderId?: string(name='OrderId'),
  configInfo?: string(name='ConfigInfo'),
  clientToken?: string(name='ClientToken'),
  scheduleType?: string(name='ScheduleType'),
  scheduleCycleDate?: string(name='ScheduleCycleDate'),
  scheduleTimesShrink?: string(name='ScheduleTimes'),
  isPolling?: string(name='IsPolling'),
  overallExecutionTime?: string(name='OverallExecutionTime'),
  sliceExecutionTime?: string(name='SliceExecutionTime'),
  computeFrequencyType?: string(name='ComputeFrequencyType'),
  algorithmId?: string(name='AlgorithmId'),
  validYear?: int32(name='ValidYear'),
  validMonth?: int32(name='ValidMonth'),
  validDay?: int32(name='ValidDay'),
}

model AddDeviceAbilityResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model AddDeviceAbilityResponse = {
  headers: map[string]string(name='headers'),
  body: AddDeviceAbilityResponseBody(name='body'),
}

async function addDeviceAbilityWithOptions(tmpReq: AddDeviceAbilityRequest, runtime: Util.RuntimeOptions): AddDeviceAbilityResponse {
  Util.validateModel(tmpReq);
  var request = new AddDeviceAbilityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.scheduleTimes)) {
    request.scheduleTimesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.scheduleTimes, 'ScheduleTimes', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddDeviceAbility', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addDeviceAbility(request: AddDeviceAbilityRequest): AddDeviceAbilityResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDeviceAbilityWithOptions(request, runtime);
}

model AddEdgeDevicesRequest {
  corpId?: string(name='CorpId'),
  iconPath?: string(name='IconPath'),
  name?: string(name='Name'),
  detailJson?: string(name='DetailJson'),
}

model AddEdgeDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddEdgeDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: AddEdgeDevicesResponseBody(name='body'),
}

async function addEdgeDevicesWithOptions(request: AddEdgeDevicesRequest, runtime: Util.RuntimeOptions): AddEdgeDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddEdgeDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addEdgeDevices(request: AddEdgeDevicesRequest): AddEdgeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return addEdgeDevicesWithOptions(request, runtime);
}

model AddUserLibraryRequest {
  corpId?: string(name='CorpId'),
  name?: string(name='Name'),
  identityCard?: string(name='IdentityCard'),
  profession?: string(name='Profession'),
  photo?: string(name='Photo'),
}

model AddUserLibraryResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddUserLibraryResponse = {
  headers: map[string]string(name='headers'),
  body: AddUserLibraryResponseBody(name='body'),
}

async function addUserLibraryWithOptions(request: AddUserLibraryRequest, runtime: Util.RuntimeOptions): AddUserLibraryResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddUserLibrary', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addUserLibrary(request: AddUserLibraryRequest): AddUserLibraryResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserLibraryWithOptions(request, runtime);
}

model AddUserLibraryByZipRequest {
  corpId?: string(name='CorpId'),
  photo?: map[string]any(name='Photo'),
}

model AddUserLibraryByZipShrinkRequest {
  corpId?: string(name='CorpId'),
  photoShrink?: string(name='Photo'),
}

model AddUserLibraryByZipResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddUserLibraryByZipResponse = {
  headers: map[string]string(name='headers'),
  body: AddUserLibraryByZipResponseBody(name='body'),
}

async function addUserLibraryByZipWithOptions(tmpReq: AddUserLibraryByZipRequest, runtime: Util.RuntimeOptions): AddUserLibraryByZipResponse {
  Util.validateModel(tmpReq);
  var request = new AddUserLibraryByZipShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.photo)) {
    request.photoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.photo, 'Photo', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddUserLibraryByZip', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addUserLibraryByZip(request: AddUserLibraryByZipRequest): AddUserLibraryByZipResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserLibraryByZipWithOptions(request, runtime);
}

model BindEdgeDeviceRequest {
  name?: string(name='Name'),
  edgeDeviceId?: string(name='EdgeDeviceId'),
  corpId?: string(name='CorpId'),
  id?: string(name='Id'),
}

model BindEdgeDeviceResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model BindEdgeDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: BindEdgeDeviceResponseBody(name='body'),
}

async function bindEdgeDeviceWithOptions(request: BindEdgeDeviceRequest, runtime: Util.RuntimeOptions): BindEdgeDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BindEdgeDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function bindEdgeDevice(request: BindEdgeDeviceRequest): BindEdgeDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindEdgeDeviceWithOptions(request, runtime);
}

model CreateCorpRequest {
  appName?: string(name='AppName'),
  corpName?: string(name='CorpName'),
  iconPath?: string(name='IconPath'),
  description?: string(name='Description'),
  clientToken?: string(name='ClientToken'),
}

model CreateCorpResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model CreateCorpResponse = {
  headers: map[string]string(name='headers'),
  body: CreateCorpResponseBody(name='body'),
}

async function createCorpWithOptions(request: CreateCorpRequest, runtime: Util.RuntimeOptions): CreateCorpResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateCorp', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createCorp(request: CreateCorpRequest): CreateCorpResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCorpWithOptions(request, runtime);
}

model CreateCorpInfoRequest {
  corpName?: string(name='CorpName'),
  appName?: string(name='AppName'),
}

model CreateCorpInfoResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateCorpInfoResponse = {
  headers: map[string]string(name='headers'),
  body: CreateCorpInfoResponseBody(name='body'),
}

async function createCorpInfoWithOptions(request: CreateCorpInfoRequest, runtime: Util.RuntimeOptions): CreateCorpInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateCorpInfo', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createCorpInfo(request: CreateCorpInfoRequest): CreateCorpInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCorpInfoWithOptions(request, runtime);
}

model CreateDeviceRequest {
  corpId?: string(name='CorpId'),
  dataSourceType?: string(name='DataSourceType'),
  cityCode?: string(name='CityCode'),
  deviceName?: string(name='DeviceName'),
  deviceVendor?: string(name='DeviceVendor'),
  latitude?: string(name='Latitude'),
  longitude?: string(name='Longitude'),
  deviceGroupName?: string(name='DeviceGroupName'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceType?: string(name='DeviceType'),
  subDeviceCount?: long(name='SubDeviceCount'),
  deviceModel?: string(name='DeviceModel'),
  gbId?: string(name='GbId'),
  filePath?: string(name='FilePath'),
  clientToken?: string(name='ClientToken'),
}

model CreateDeviceResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    channelGbId?: string(name='ChannelGbId'),
    sipReaml?: string(name='SipReaml'),
    sipIp?: string(name='SipIp'),
    deviceName?: string(name='DeviceName'),
    sipDeviceGbId?: string(name='SipDeviceGbId'),
    sipPassword?: string(name='SipPassword'),
    deviceCode?: string(name='DeviceCode'),
    sipPort?: string(name='SipPort'),
    sipGbId?: string(name='SipGbId'),
  }(name='Data'),
}

model CreateDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: CreateDeviceResponseBody(name='body'),
}

async function createDeviceWithOptions(request: CreateDeviceRequest, runtime: Util.RuntimeOptions): CreateDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createDevice(request: CreateDeviceRequest): CreateDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDeviceWithOptions(request, runtime);
}

model DeleteAbilityConfigByDeviceIdRequest {
  corpId?: string(name='CorpId'),
  id?: string(name='Id'),
}

model DeleteAbilityConfigByDeviceIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteAbilityConfigByDeviceIdResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteAbilityConfigByDeviceIdResponseBody(name='body'),
}

async function deleteAbilityConfigByDeviceIdWithOptions(request: DeleteAbilityConfigByDeviceIdRequest, runtime: Util.RuntimeOptions): DeleteAbilityConfigByDeviceIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteAbilityConfigByDeviceId', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteAbilityConfigByDeviceId(request: DeleteAbilityConfigByDeviceIdRequest): DeleteAbilityConfigByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAbilityConfigByDeviceIdWithOptions(request, runtime);
}

model DeleteCorpRequest {
  corpId?: string(name='CorpId'),
}

model DeleteCorpResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model DeleteCorpResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteCorpResponseBody(name='body'),
}

async function deleteCorpWithOptions(request: DeleteCorpRequest, runtime: Util.RuntimeOptions): DeleteCorpResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteCorp', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteCorp(request: DeleteCorpRequest): DeleteCorpResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCorpWithOptions(request, runtime);
}

model DeleteIpcDeviceRequest {
  corpId?: string(name='CorpId'),
  gbId?: string(name='GbId'),
}

model DeleteIpcDeviceResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteIpcDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteIpcDeviceResponseBody(name='body'),
}

async function deleteIpcDeviceWithOptions(request: DeleteIpcDeviceRequest, runtime: Util.RuntimeOptions): DeleteIpcDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteIpcDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteIpcDevice(request: DeleteIpcDeviceRequest): DeleteIpcDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteIpcDeviceWithOptions(request, runtime);
}

model DeleteNvrChannelRequest {
  deviceCodes?: string(name='DeviceCodes'),
}

model DeleteNvrChannelResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteNvrChannelResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteNvrChannelResponseBody(name='body'),
}

async function deleteNvrChannelWithOptions(request: DeleteNvrChannelRequest, runtime: Util.RuntimeOptions): DeleteNvrChannelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteNvrChannel', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteNvrChannel(request: DeleteNvrChannelRequest): DeleteNvrChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNvrChannelWithOptions(request, runtime);
}

model DeleteNvrDeviceRequest {
  deviceCodes?: string(name='DeviceCodes'),
}

model DeleteNvrDeviceResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteNvrDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteNvrDeviceResponseBody(name='body'),
}

async function deleteNvrDeviceWithOptions(request: DeleteNvrDeviceRequest, runtime: Util.RuntimeOptions): DeleteNvrDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteNvrDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteNvrDevice(request: DeleteNvrDeviceRequest): DeleteNvrDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNvrDeviceWithOptions(request, runtime);
}

model DeleteUserLibraryByIdRequest {
  corpId?: string(name='CorpId'),
  id?: string(name='Id'),
}

model DeleteUserLibraryByIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteUserLibraryByIdResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteUserLibraryByIdResponseBody(name='body'),
}

async function deleteUserLibraryByIdWithOptions(request: DeleteUserLibraryByIdRequest, runtime: Util.RuntimeOptions): DeleteUserLibraryByIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteUserLibraryById', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteUserLibraryById(request: DeleteUserLibraryByIdRequest): DeleteUserLibraryByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserLibraryByIdWithOptions(request, runtime);
}

model DescribeDevicesRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  corpIdList?: string(name='CorpIdList'),
  isvId?: string(name='IsvId'),
}

model DescribeDevicesResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: long(name='TotalPage'),
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    totalCount?: long(name='TotalCount'),
    records?: [ 
      {
        status?: string(name='Status'),
        deviceName?: string(name='DeviceName'),
        deviceId?: long(name='DeviceId'),
        deviceType?: string(name='DeviceType'),
        deviceAddress?: string(name='DeviceAddress'),
        createTime?: string(name='CreateTime'),
        capturedPictureId?: string(name='CapturedPictureId'),
        vendor?: string(name='Vendor'),
        corpId?: string(name='CorpId'),
        inProtocol?: string(name='InProtocol'),
        longitude?: string(name='Longitude'),
        latitude?: string(name='Latitude'),
      }
    ](name='Records'),
  }(name='Data'),
}

model DescribeDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDevicesResponseBody(name='body'),
}

async function describeDevicesWithOptions(request: DescribeDevicesRequest, runtime: Util.RuntimeOptions): DescribeDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDevices(request: DescribeDevicesRequest): DescribeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDevicesWithOptions(request, runtime);
}

model FullUploadFileResponseRequest {
  corpId?: string(name='CorpId'),
  fileName?: string(name='FileName'),
}

model FullUploadFileResponseResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model FullUploadFileResponseResponse = {
  headers: map[string]string(name='headers'),
  body: FullUploadFileResponseResponseBody(name='body'),
}

async function fullUploadFileResponseWithOptions(request: FullUploadFileResponseRequest, runtime: Util.RuntimeOptions): FullUploadFileResponseResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('FullUploadFileResponse', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function fullUploadFileResponse(request: FullUploadFileResponseRequest): FullUploadFileResponseResponse {
  var runtime = new Util.RuntimeOptions{};
  return fullUploadFileResponseWithOptions(request, runtime);
}

model GetAbilityConfigListByDeviceIdRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
}

model GetAbilityConfigListByDeviceIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ string ](name='Data'),
}

model GetAbilityConfigListByDeviceIdResponse = {
  headers: map[string]string(name='headers'),
  body: GetAbilityConfigListByDeviceIdResponseBody(name='body'),
}

async function getAbilityConfigListByDeviceIdWithOptions(request: GetAbilityConfigListByDeviceIdRequest, runtime: Util.RuntimeOptions): GetAbilityConfigListByDeviceIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAbilityConfigListByDeviceId', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAbilityConfigListByDeviceId(request: GetAbilityConfigListByDeviceIdRequest): GetAbilityConfigListByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAbilityConfigListByDeviceIdWithOptions(request, runtime);
}

model GetAbilityDetailByDeviceIdRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  id?: string(name='Id'),
}

model GetAbilityDetailByDeviceIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetAbilityDetailByDeviceIdResponse = {
  headers: map[string]string(name='headers'),
  body: GetAbilityDetailByDeviceIdResponseBody(name='body'),
}

async function getAbilityDetailByDeviceIdWithOptions(request: GetAbilityDetailByDeviceIdRequest, runtime: Util.RuntimeOptions): GetAbilityDetailByDeviceIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAbilityDetailByDeviceId', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAbilityDetailByDeviceId(request: GetAbilityDetailByDeviceIdRequest): GetAbilityDetailByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAbilityDetailByDeviceIdWithOptions(request, runtime);
}

model GetAllEdgeDevicesRequest {
  corpId?: string(name='CorpId'),
}

model GetAllEdgeDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      status?: string(name='Status'),
      detailJson?: string(name='DetailJson'),
      isvId?: string(name='IsvId'),
      corpId?: string(name='CorpId'),
      isDelete?: string(name='IsDelete'),
      name?: string(name='Name'),
      id?: long(name='Id'),
      iconPath?: string(name='IconPath'),
      xcsVideoDeviceVO?: [ 
        {
          status?: string(name='Status'),
          detailJson?: string(name='DetailJson'),
          edgeDeviceId?: string(name='EdgeDeviceId'),
          isvId?: string(name='IsvId'),
          corpId?: string(name='CorpId'),
          isDelete?: string(name='IsDelete'),
          name?: string(name='Name'),
          id?: string(name='Id'),
        }
      ](name='XcsVideoDeviceVO'),
    }
  ](name='Data'),
}

model GetAllEdgeDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: GetAllEdgeDevicesResponseBody(name='body'),
}

async function getAllEdgeDevicesWithOptions(request: GetAllEdgeDevicesRequest, runtime: Util.RuntimeOptions): GetAllEdgeDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAllEdgeDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAllEdgeDevices(request: GetAllEdgeDevicesRequest): GetAllEdgeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAllEdgeDevicesWithOptions(request, runtime);
}

model GetAllVideoDevicesRequest {
  corpId?: string(name='CorpId'),
  edgeDeviceId?: string(name='EdgeDeviceId'),
}

model GetAllVideoDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      status?: string(name='Status'),
      detailJson?: string(name='DetailJson'),
      edgeDeviceId?: string(name='EdgeDeviceId'),
      isvId?: string(name='IsvId'),
      corpId?: string(name='CorpId'),
      isDelete?: string(name='IsDelete'),
      name?: string(name='Name'),
      id?: string(name='Id'),
    }
  ](name='Data'),
}

model GetAllVideoDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: GetAllVideoDevicesResponseBody(name='body'),
}

async function getAllVideoDevicesWithOptions(request: GetAllVideoDevicesRequest, runtime: Util.RuntimeOptions): GetAllVideoDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAllVideoDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAllVideoDevices(request: GetAllVideoDevicesRequest): GetAllVideoDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAllVideoDevicesWithOptions(request, runtime);
}

model GetDeviceInfoRequest {
  status?: string(name='Status'),
  isvId?: string(name='IsvId'),
}

model GetDeviceInfoResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      status?: string(name='Status'),
      deviceName?: string(name='DeviceName'),
      deviceType?: string(name='DeviceType'),
      deviceAddress?: string(name='DeviceAddress'),
      deviceId?: string(name='DeviceId'),
      createTime?: string(name='CreateTime'),
      capturedPictureId?: string(name='CapturedPictureId'),
      vendor?: string(name='Vendor'),
      corpId?: string(name='CorpId'),
      inProtocol?: string(name='InProtocol'),
      longitude?: string(name='Longitude'),
      latitude?: string(name='Latitude'),
    }
  ](name='Data'),
}

model GetDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetDeviceInfoResponseBody(name='body'),
}

async function getDeviceInfoWithOptions(request: GetDeviceInfoRequest, runtime: Util.RuntimeOptions): GetDeviceInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDeviceInfo', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDeviceInfo(request: GetDeviceInfoRequest): GetDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceInfoWithOptions(request, runtime);
}

model GetDeviceInfoByIdRequest {
  deviceId?: string(name='DeviceId'),
  corpId?: string(name='CorpId'),
  isvId?: string(name='IsvId'),
}

model GetDeviceInfoByIdResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetDeviceInfoByIdResponse = {
  headers: map[string]string(name='headers'),
  body: GetDeviceInfoByIdResponseBody(name='body'),
}

async function getDeviceInfoByIdWithOptions(request: GetDeviceInfoByIdRequest, runtime: Util.RuntimeOptions): GetDeviceInfoByIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDeviceInfoById', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDeviceInfoById(request: GetDeviceInfoByIdRequest): GetDeviceInfoByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceInfoByIdWithOptions(request, runtime);
}

model GetEdgeAbilitiesRequest {
  corpId?: string(name='CorpId'),
  edgeId?: string(name='EdgeId'),
}

model GetEdgeAbilitiesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetEdgeAbilitiesResponse = {
  headers: map[string]string(name='headers'),
  body: GetEdgeAbilitiesResponseBody(name='body'),
}

async function getEdgeAbilitiesWithOptions(request: GetEdgeAbilitiesRequest, runtime: Util.RuntimeOptions): GetEdgeAbilitiesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetEdgeAbilities', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getEdgeAbilities(request: GetEdgeAbilitiesRequest): GetEdgeAbilitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEdgeAbilitiesWithOptions(request, runtime);
}

model GetEventDatasRequest {
  corpId?: string(name='CorpId'),
  startTime?: string(name='StartTime'),
  endTime?: string(name='EndTime'),
  cameraNames?: string(name='CameraNames'),
  eventNames?: string(name='EventNames'),
  pageSize?: int32(name='PageSize'),
  pageNum?: int32(name='PageNum'),
  eventSorts?: string(name='EventSorts'),
}

model GetEventDatasResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: int32(name='TotalPage'),
    pageNum?: int32(name='PageNum'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    result?: [ 
      {
        eventName?: string(name='EventName'),
        cameraId?: string(name='CameraId'),
        sourceImageSize?: string(name='SourceImageSize'),
        bizDay?: string(name='BizDay'),
        edgeDeviceId?: string(name='EdgeDeviceId'),
        userId?: string(name='UserId'),
        isvId?: string(name='IsvId'),
        edgeDeviceName?: string(name='EdgeDeviceName'),
        cameraName?: string(name='CameraName'),
        squareList?: string(name='SquareList'),
        sourceImageUrl?: string(name='SourceImageUrl'),
        eventId?: string(name='EventId'),
        targetImageUrl?: string(name='TargetImageUrl'),
        eventType?: string(name='EventType'),
        personNum?: int32(name='PersonNum'),
        corpId?: string(name='CorpId'),
        eventSort?: string(name='EventSort'),
        areaList?: string(name='AreaList'),
        processCreateTime?: string(name='ProcessCreateTime'),
        userName?: string(name='UserName'),
        dbCreateTime?: string(name='DbCreateTime'),
        sourceCreateTime?: string(name='SourceCreateTime'),
      }
    ](name='Result'),
  }(name='Data'),
}

model GetEventDatasResponse = {
  headers: map[string]string(name='headers'),
  body: GetEventDatasResponseBody(name='body'),
}

async function getEventDatasWithOptions(request: GetEventDatasRequest, runtime: Util.RuntimeOptions): GetEventDatasResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetEventDatas', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getEventDatas(request: GetEventDatasRequest): GetEventDatasResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEventDatasWithOptions(request, runtime);
}

model GetEventInfosRequest {
  corpId?: string(name='CorpId'),
}

model GetEventInfosResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      eventSort?: string(name='EventSort'),
      eventName?: string(name='EventName'),
    }
  ](name='Data'),
}

model GetEventInfosResponse = {
  headers: map[string]string(name='headers'),
  body: GetEventInfosResponseBody(name='body'),
}

async function getEventInfosWithOptions(request: GetEventInfosRequest, runtime: Util.RuntimeOptions): GetEventInfosResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetEventInfos', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getEventInfos(request: GetEventInfosRequest): GetEventInfosResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEventInfosWithOptions(request, runtime);
}

model GetEventMistakeDatasRequest {
  corpId?: string(name='CorpId'),
  startTime?: string(name='StartTime'),
  endTime?: string(name='EndTime'),
  cameraNames?: string(name='CameraNames'),
  eventNames?: string(name='EventNames'),
  pageSize?: int32(name='PageSize'),
  pageNum?: int32(name='PageNum'),
}

model GetEventMistakeDatasResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: int32(name='TotalPage'),
    pageNum?: int32(name='PageNum'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    result?: [ 
      {
        eventName?: string(name='EventName'),
        cameraId?: string(name='CameraId'),
        sourceImageSize?: string(name='SourceImageSize'),
        bizDay?: string(name='BizDay'),
        edgeDeviceId?: string(name='EdgeDeviceId'),
        isvId?: string(name='IsvId'),
        edgeDeviceName?: string(name='EdgeDeviceName'),
        cameraName?: string(name='CameraName'),
        squareList?: string(name='SquareList'),
        sourceImageUrl?: string(name='SourceImageUrl'),
        eventId?: string(name='EventId'),
        targetImageUrl?: string(name='TargetImageUrl'),
        eventType?: string(name='EventType'),
        corpId?: string(name='CorpId'),
        eventSort?: string(name='EventSort'),
        areaList?: string(name='AreaList'),
        processCreateTime?: string(name='ProcessCreateTime'),
        dbCreateTime?: string(name='DbCreateTime'),
        sourceCreateTime?: string(name='SourceCreateTime'),
      }
    ](name='Result'),
  }(name='Data'),
}

model GetEventMistakeDatasResponse = {
  headers: map[string]string(name='headers'),
  body: GetEventMistakeDatasResponseBody(name='body'),
}

async function getEventMistakeDatasWithOptions(request: GetEventMistakeDatasRequest, runtime: Util.RuntimeOptions): GetEventMistakeDatasResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetEventMistakeDatas', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getEventMistakeDatas(request: GetEventMistakeDatasRequest): GetEventMistakeDatasResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEventMistakeDatasWithOptions(request, runtime);
}

model GetIpcDetailRequest {
  corpId?: string(name='CorpId'),
  gbId?: string(name='GbId'),
}

model GetIpcDetailResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    abilityConfigDetail?: [ 
      {
        status?: string(name='Status'),
        endTime?: string(name='EndTime'),
        startTime?: string(name='StartTime'),
        deviceId?: string(name='DeviceId'),
        corpId?: string(name='CorpId'),
        abilityType?: string(name='AbilityType'),
        abilityName?: string(name='AbilityName'),
        orderId?: string(name='OrderId'),
        algorithmId?: string(name='AlgorithmId'),
      }
    ](name='AbilityConfigDetail'),
  }(name='Data'),
}

model GetIpcDetailResponse = {
  headers: map[string]string(name='headers'),
  body: GetIpcDetailResponseBody(name='body'),
}

async function getIpcDetailWithOptions(request: GetIpcDetailRequest, runtime: Util.RuntimeOptions): GetIpcDetailResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetIpcDetail', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getIpcDetail(request: GetIpcDetailRequest): GetIpcDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getIpcDetailWithOptions(request, runtime);
}

model GetPhotoUrlRequest {
  photoUrl?: string(name='PhotoUrl'),
}

model GetPhotoUrlResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetPhotoUrlResponse = {
  headers: map[string]string(name='headers'),
  body: GetPhotoUrlResponseBody(name='body'),
}

async function getPhotoUrlWithOptions(request: GetPhotoUrlRequest, runtime: Util.RuntimeOptions): GetPhotoUrlResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPhotoUrl', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPhotoUrl(request: GetPhotoUrlRequest): GetPhotoUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPhotoUrlWithOptions(request, runtime);
}

model GetUnbindedEdgeDevicesRequest {
  name?: string(name='Name'),
  edgeDeviceId?: string(name='EdgeDeviceId'),
}

model GetUnbindedEdgeDevicesResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetUnbindedEdgeDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: GetUnbindedEdgeDevicesResponseBody(name='body'),
}

async function getUnbindedEdgeDevicesWithOptions(request: GetUnbindedEdgeDevicesRequest, runtime: Util.RuntimeOptions): GetUnbindedEdgeDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetUnbindedEdgeDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getUnbindedEdgeDevices(request: GetUnbindedEdgeDevicesRequest): GetUnbindedEdgeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUnbindedEdgeDevicesWithOptions(request, runtime);
}

model GetUserLibraryByIdRequest {
  corpId?: string(name='CorpId'),
  id?: string(name='Id'),
}

model GetUserLibraryByIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    professionId?: int32(name='ProfessionId'),
    corpId?: string(name='CorpId'),
    isvId?: string(name='IsvId'),
    gmtCreate?: string(name='GmtCreate'),
    isDelete?: string(name='IsDelete'),
    identityCard?: string(name='IdentityCard'),
    name?: string(name='Name'),
    gmtModified?: string(name='GmtModified'),
    photoUrl?: string(name='PhotoUrl'),
    professionName?: string(name='ProfessionName'),
    id?: int32(name='Id'),
  }(name='Data'),
}

model GetUserLibraryByIdResponse = {
  headers: map[string]string(name='headers'),
  body: GetUserLibraryByIdResponseBody(name='body'),
}

async function getUserLibraryByIdWithOptions(request: GetUserLibraryByIdRequest, runtime: Util.RuntimeOptions): GetUserLibraryByIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetUserLibraryById', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getUserLibraryById(request: GetUserLibraryByIdRequest): GetUserLibraryByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserLibraryByIdWithOptions(request, runtime);
}

model GetVideoDeviceByIdRequest {
  corpId?: string(name='CorpId'),
  id?: string(name='Id'),
}

model GetVideoDeviceByIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetVideoDeviceByIdResponse = {
  headers: map[string]string(name='headers'),
  body: GetVideoDeviceByIdResponseBody(name='body'),
}

async function getVideoDeviceByIdWithOptions(request: GetVideoDeviceByIdRequest, runtime: Util.RuntimeOptions): GetVideoDeviceByIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetVideoDeviceById', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getVideoDeviceById(request: GetVideoDeviceByIdRequest): GetVideoDeviceByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVideoDeviceByIdWithOptions(request, runtime);
}

model GetVideoPlayUrlRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  edgeId?: string(name='EdgeId'),
}

model GetVideoPlayUrlResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetVideoPlayUrlResponse = {
  headers: map[string]string(name='headers'),
  body: GetVideoPlayUrlResponseBody(name='body'),
}

async function getVideoPlayUrlWithOptions(request: GetVideoPlayUrlRequest, runtime: Util.RuntimeOptions): GetVideoPlayUrlResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetVideoPlayUrl', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getVideoPlayUrl(request: GetVideoPlayUrlRequest): GetVideoPlayUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVideoPlayUrlWithOptions(request, runtime);
}

model GetVideoScreenShotRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  edgeId?: string(name='EdgeId'),
}

model GetVideoScreenShotResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetVideoScreenShotResponse = {
  headers: map[string]string(name='headers'),
  body: GetVideoScreenShotResponseBody(name='body'),
}

async function getVideoScreenShotWithOptions(request: GetVideoScreenShotRequest, runtime: Util.RuntimeOptions): GetVideoScreenShotResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetVideoScreenShot', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getVideoScreenShot(request: GetVideoScreenShotRequest): GetVideoScreenShotResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVideoScreenShotWithOptions(request, runtime);
}

model ListAllProfessionRequest {
  corpId?: string(name='CorpId'),
}

model ListAllProfessionResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      professionName?: string(name='ProfessionName'),
      professionId?: int32(name='ProfessionId'),
    }
  ](name='Data'),
}

model ListAllProfessionResponse = {
  headers: map[string]string(name='headers'),
  body: ListAllProfessionResponseBody(name='body'),
}

async function listAllProfessionWithOptions(request: ListAllProfessionRequest, runtime: Util.RuntimeOptions): ListAllProfessionResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListAllProfession', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listAllProfession(request: ListAllProfessionRequest): ListAllProfessionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAllProfessionWithOptions(request, runtime);
}

model ListCorpRequest {
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model ListCorpResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    pageNum?: string(name='PageNum'),
    totalPage?: string(name='TotalPage'),
    pageSize?: string(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    records?: [ 
      {
        appName?: string(name='AppName'),
        gmtModifiedDate?: string(name='GmtModifiedDate'),
        description?: string(name='Description'),
        corpId?: string(name='CorpId'),
        corpName?: string(name='CorpName'),
        gmtCreateDate?: string(name='GmtCreateDate'),
        id?: long(name='Id'),
        iconPath?: string(name='IconPath'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListCorpResponse = {
  headers: map[string]string(name='headers'),
  body: ListCorpResponseBody(name='body'),
}

async function listCorpWithOptions(request: ListCorpRequest, runtime: Util.RuntimeOptions): ListCorpResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListCorp', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listCorp(request: ListCorpRequest): ListCorpResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCorpWithOptions(request, runtime);
}

model ListCorpsRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  corpName?: string(name='CorpName'),
}

model ListCorpsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
  data?: {
    totalPage?: long(name='TotalPage'),
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    totalCount?: long(name='TotalCount'),
    records?: [ 
      {
        appName?: string(name='AppName'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        createTime?: string(name='CreateTime'),
        corpId?: string(name='CorpId'),
        corpName?: string(name='CorpName'),
        id?: long(name='Id'),
        iconPath?: string(name='IconPath'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListCorpsResponse = {
  headers: map[string]string(name='headers'),
  body: ListCorpsResponseBody(name='body'),
}

async function listCorpsWithOptions(request: ListCorpsRequest, runtime: Util.RuntimeOptions): ListCorpsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListCorps', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listCorps(request: ListCorpsRequest): ListCorpsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCorpsWithOptions(request, runtime);
}

model ListEventAlgorithmDetailsRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  eventType?: string(name='EventType'),
  startTime?: string(name='StartTime'),
  endTime?: string(name='EndTime'),
  corpId?: string(name='CorpId'),
  isvId?: string(name='IsvId'),
}

model ListEventAlgorithmDetailsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: long(name='TotalPage'),
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    totalCount?: long(name='TotalCount'),
    records?: [ 
      {
        appName?: string(name='AppName'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        createTime?: string(name='CreateTime'),
        corpId?: string(name='CorpId'),
        corpName?: string(name='CorpName'),
        id?: long(name='Id'),
        iconPath?: string(name='IconPath'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListEventAlgorithmDetailsResponse = {
  headers: map[string]string(name='headers'),
  body: ListEventAlgorithmDetailsResponseBody(name='body'),
}

async function listEventAlgorithmDetailsWithOptions(request: ListEventAlgorithmDetailsRequest, runtime: Util.RuntimeOptions): ListEventAlgorithmDetailsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListEventAlgorithmDetails', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listEventAlgorithmDetails(request: ListEventAlgorithmDetailsRequest): ListEventAlgorithmDetailsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEventAlgorithmDetailsWithOptions(request, runtime);
}

model ListFccProductOrdersRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListFccProductOrdersResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    pageNum?: int32(name='PageNum'),
    totalPage?: int32(name='TotalPage'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    records?: [ 
      {
        restCount?: int32(name='RestCount'),
        validMonth?: int32(name='ValidMonth'),
        validYear?: int32(name='ValidYear'),
        usedCount?: int32(name='UsedCount'),
        validDay?: int32(name='ValidDay'),
        totalCount?: int32(name='TotalCount'),
        createDate?: string(name='CreateDate'),
        orderId?: string(name='OrderId'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListFccProductOrdersResponse = {
  headers: map[string]string(name='headers'),
  body: ListFccProductOrdersResponseBody(name='body'),
}

async function listFccProductOrdersWithOptions(request: ListFccProductOrdersRequest, runtime: Util.RuntimeOptions): ListFccProductOrdersResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListFccProductOrders', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listFccProductOrders(request: ListFccProductOrdersRequest): ListFccProductOrdersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFccProductOrdersWithOptions(request, runtime);
}

model ListIpcDevicesRequest {
  corpId?: string(name='CorpId'),
  gbId?: string(name='GbId'),
  deviceName?: string(name='DeviceName'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  status?: int32(name='Status'),
}

model ListIpcDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: int32(name='TotalPage'),
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    records?: [ 
      {
        status?: int32(name='Status'),
        sipGBId?: string(name='SipGBId'),
        deviceName?: string(name='DeviceName'),
        deviceDirection?: string(name='DeviceDirection'),
        deviceAddress?: string(name='DeviceAddress'),
        deviceType?: string(name='DeviceType'),
        createTime?: string(name='CreateTime'),
        sipPassword?: string(name='SipPassword'),
        sipServerPort?: string(name='SipServerPort'),
        vendor?: string(name='Vendor'),
        gbId?: string(name='GbId'),
        coverImageUrl?: string(name='CoverImageUrl'),
        accessProtocolType?: string(name='AccessProtocolType'),
        deviceSite?: string(name='DeviceSite'),
        longitude?: string(name='Longitude'),
        latitude?: string(name='Latitude'),
        resolution?: string(name='Resolution'),
        sipServerIp?: string(name='SipServerIp'),
        bitRate?: string(name='BitRate'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListIpcDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: ListIpcDevicesResponseBody(name='body'),
}

async function listIpcDevicesWithOptions(request: ListIpcDevicesRequest, runtime: Util.RuntimeOptions): ListIpcDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListIpcDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listIpcDevices(request: ListIpcDevicesRequest): ListIpcDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listIpcDevicesWithOptions(request, runtime);
}

model ListNvrChannelDevicesRequest {
  isPage?: int32(name='IsPage'),
  pageNumber?: long(name='PageNumber'),
  deviceCode?: string(name='DeviceCode'),
  pageSize?: long(name='PageSize'),
}

model ListNvrChannelDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: long(name='TotalPage'),
    pageNumber?: long(name='PageNumber'),
    pageSize?: long(name='PageSize'),
    totalCount?: long(name='TotalCount'),
    records?: [ 
      {
        deviceName?: string(name='DeviceName'),
        deviceType?: string(name='DeviceType'),
        sampleName?: string(name='SampleName'),
        projectName?: string(name='ProjectName'),
        vap?: string(name='Vap'),
        deviceStatus?: string(name='DeviceStatus'),
        comptureStatus?: string(name='ComptureStatus'),
        streamStatus?: string(name='StreamStatus'),
        deviceSn?: string(name='DeviceSn'),
        regionName?: string(name='RegionName'),
        corpId?: string(name='CorpId'),
        datasourceType?: string(name='DatasourceType'),
        deviceCode?: string(name='DeviceCode'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListNvrChannelDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: ListNvrChannelDevicesResponseBody(name='body'),
}

async function listNvrChannelDevicesWithOptions(request: ListNvrChannelDevicesRequest, runtime: Util.RuntimeOptions): ListNvrChannelDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListNvrChannelDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listNvrChannelDevices(request: ListNvrChannelDevicesRequest): ListNvrChannelDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNvrChannelDevicesWithOptions(request, runtime);
}

model ListNvrDevicesRequest {
  corpIdList?: string(name='CorpIdList'),
  deviceCode?: string(name='DeviceCode'),
  isPage?: long(name='IsPage'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
}

model ListNvrDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: long(name='TotalPage'),
    pageNumber?: long(name='PageNumber'),
    pageSize?: long(name='PageSize'),
    totalCount?: long(name='TotalCount'),
    records?: [ 
      {
        type?: string(name='Type'),
        deviceName?: string(name='DeviceName'),
        deviceType?: string(name='DeviceType'),
        projectName?: string(name='ProjectName'),
        deviceStatus?: string(name='DeviceStatus'),
        comptureStatus?: string(name='ComptureStatus'),
        streamStatus?: string(name='StreamStatus'),
        registrationTime?: string(name='RegistrationTime'),
        deviceSn?: string(name='DeviceSn'),
        regionName?: string(name='RegionName'),
        corpId?: string(name='CorpId'),
        channel?: string(name='Channel'),
        datasourceType?: string(name='DatasourceType'),
        accessQuota?: string(name='AccessQuota'),
        deviceCode?: string(name='DeviceCode'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListNvrDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: ListNvrDevicesResponseBody(name='body'),
}

async function listNvrDevicesWithOptions(request: ListNvrDevicesRequest, runtime: Util.RuntimeOptions): ListNvrDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListNvrDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listNvrDevices(request: ListNvrDevicesRequest): ListNvrDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNvrDevicesWithOptions(request, runtime);
}

model ListUserLibraryByPageRequest {
  corpId?: string(name='CorpId'),
  pageSize?: string(name='PageSize'),
  pageNumber?: string(name='PageNumber'),
  name?: string(name='Name'),
}

model ListUserLibraryByPageResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    totalPage?: int32(name='TotalPage'),
    pageNum?: int32(name='PageNum'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    records?: [ 
      {
        professionId?: int32(name='ProfessionId'),
        corpId?: string(name='CorpId'),
        isvId?: string(name='IsvId'),
        gmtCreate?: string(name='GmtCreate'),
        isDelete?: string(name='IsDelete'),
        identityCard?: string(name='IdentityCard'),
        name?: string(name='Name'),
        gmtModified?: string(name='GmtModified'),
        photoUrl?: string(name='PhotoUrl'),
        professionName?: string(name='ProfessionName'),
        id?: int32(name='Id'),
      }
    ](name='Records'),
  }(name='Data'),
}

model ListUserLibraryByPageResponse = {
  headers: map[string]string(name='headers'),
  body: ListUserLibraryByPageResponseBody(name='body'),
}

async function listUserLibraryByPageWithOptions(request: ListUserLibraryByPageRequest, runtime: Util.RuntimeOptions): ListUserLibraryByPageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListUserLibraryByPage', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listUserLibraryByPage(request: ListUserLibraryByPageRequest): ListUserLibraryByPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserLibraryByPageWithOptions(request, runtime);
}

model MarkEventDataMistakeRequest {
  corpId?: string(name='CorpId'),
  eventId?: string(name='EventId'),
  sourceCreateTime?: string(name='SourceCreateTime'),
}

model MarkEventDataMistakeResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model MarkEventDataMistakeResponse = {
  headers: map[string]string(name='headers'),
  body: MarkEventDataMistakeResponseBody(name='body'),
}

async function markEventDataMistakeWithOptions(request: MarkEventDataMistakeRequest, runtime: Util.RuntimeOptions): MarkEventDataMistakeResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('MarkEventDataMistake', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function markEventDataMistake(request: MarkEventDataMistakeRequest): MarkEventDataMistakeResponse {
  var runtime = new Util.RuntimeOptions{};
  return markEventDataMistakeWithOptions(request, runtime);
}

model RegisterCredentialRequest {
  gid?: string(name='Gid'),
  deviceId?: string(name='DeviceId'),
}

model RegisterCredentialResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    updateTime?: long(name='UpdateTime'),
    deviceAccessKeyId?: string(name='DeviceAccessKeyId'),
    createTime?: long(name='CreateTime'),
    instanceId?: string(name='InstanceId'),
    deviceAccessKeySecret?: string(name='DeviceAccessKeySecret'),
    clientId?: string(name='ClientId'),
  }(name='Data'),
}

model RegisterCredentialResponse = {
  headers: map[string]string(name='headers'),
  body: RegisterCredentialResponseBody(name='body'),
}

async function registerCredentialWithOptions(request: RegisterCredentialRequest, runtime: Util.RuntimeOptions): RegisterCredentialResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RegisterCredential', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function registerCredential(request: RegisterCredentialRequest): RegisterCredentialResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerCredentialWithOptions(request, runtime);
}

model RegisterEdgeDeviceRequest {
  name?: string(name='Name'),
  edgeDeviceId?: string(name='EdgeDeviceId'),
  detailJson?: string(name='DetailJson'),
}

model RegisterEdgeDeviceResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: {
    edgeDeviceId?: string(name='EdgeDeviceId'),
    id?: string(name='Id'),
    isvId?: string(name='IsvId'),
  }(name='Data'),
}

model RegisterEdgeDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: RegisterEdgeDeviceResponseBody(name='body'),
}

async function registerEdgeDeviceWithOptions(request: RegisterEdgeDeviceRequest, runtime: Util.RuntimeOptions): RegisterEdgeDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RegisterEdgeDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function registerEdgeDevice(request: RegisterEdgeDeviceRequest): RegisterEdgeDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerEdgeDeviceWithOptions(request, runtime);
}

model RemoveEdgeDeviceInfoRequest {
  coprId?: string(name='CoprId'),
  id?: string(name='Id'),
}

model RemoveEdgeDeviceInfoResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model RemoveEdgeDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  body: RemoveEdgeDeviceInfoResponseBody(name='body'),
}

async function removeEdgeDeviceInfoWithOptions(request: RemoveEdgeDeviceInfoRequest, runtime: Util.RuntimeOptions): RemoveEdgeDeviceInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RemoveEdgeDeviceInfo', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function removeEdgeDeviceInfo(request: RemoveEdgeDeviceInfoRequest): RemoveEdgeDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeEdgeDeviceInfoWithOptions(request, runtime);
}

model RemoveEventDataMistakeRequest {
  corpId?: string(name='CorpId'),
  eventId?: string(name='EventId'),
  sourceCreateTime?: string(name='SourceCreateTime'),
}

model RemoveEventDataMistakeResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model RemoveEventDataMistakeResponse = {
  headers: map[string]string(name='headers'),
  body: RemoveEventDataMistakeResponseBody(name='body'),
}

async function removeEventDataMistakeWithOptions(request: RemoveEventDataMistakeRequest, runtime: Util.RuntimeOptions): RemoveEventDataMistakeResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RemoveEventDataMistake', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function removeEventDataMistake(request: RemoveEventDataMistakeRequest): RemoveEventDataMistakeResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeEventDataMistakeWithOptions(request, runtime);
}

model RemoveVideoDeviceInfoRequest {
  coprId?: string(name='CoprId'),
  id?: string(name='Id'),
}

model RemoveVideoDeviceInfoResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model RemoveVideoDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  body: RemoveVideoDeviceInfoResponseBody(name='body'),
}

async function removeVideoDeviceInfoWithOptions(request: RemoveVideoDeviceInfoRequest, runtime: Util.RuntimeOptions): RemoveVideoDeviceInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RemoveVideoDeviceInfo', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function removeVideoDeviceInfo(request: RemoveVideoDeviceInfoRequest): RemoveVideoDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeVideoDeviceInfoWithOptions(request, runtime);
}

model StopDeviceAbilityRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  abilityType?: string(name='AbilityType'),
  abilityName?: string(name='AbilityName'),
  clientToken?: string(name='ClientToken'),
  algorithmId?: string(name='AlgorithmId'),
}

model StopDeviceAbilityResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model StopDeviceAbilityResponse = {
  headers: map[string]string(name='headers'),
  body: StopDeviceAbilityResponseBody(name='body'),
}

async function stopDeviceAbilityWithOptions(request: StopDeviceAbilityRequest, runtime: Util.RuntimeOptions): StopDeviceAbilityResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StopDeviceAbility', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function stopDeviceAbility(request: StopDeviceAbilityRequest): StopDeviceAbilityResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopDeviceAbilityWithOptions(request, runtime);
}

model StopOrStartAbilityByDeviceIdRequest {
  corpId?: string(name='CorpId'),
  id?: string(name='Id'),
  status?: string(name='Status'),
}

model StopOrStartAbilityByDeviceIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model StopOrStartAbilityByDeviceIdResponse = {
  headers: map[string]string(name='headers'),
  body: StopOrStartAbilityByDeviceIdResponseBody(name='body'),
}

async function stopOrStartAbilityByDeviceIdWithOptions(request: StopOrStartAbilityByDeviceIdRequest, runtime: Util.RuntimeOptions): StopOrStartAbilityByDeviceIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StopOrStartAbilityByDeviceId', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function stopOrStartAbilityByDeviceId(request: StopOrStartAbilityByDeviceIdRequest): StopOrStartAbilityByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopOrStartAbilityByDeviceIdWithOptions(request, runtime);
}

model TestTestResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model TestTestResponse = {
  headers: map[string]string(name='headers'),
  body: TestTestResponseBody(name='body'),
}

async function testTestWithOptions(runtime: Util.RuntimeOptions): TestTestResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('TestTest', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function testTest(): TestTestResponse {
  var runtime = new Util.RuntimeOptions{};
  return testTestWithOptions(runtime);
}

model UpdateAbilityConfigByDeviceIdRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  eventSort?: string(name='EventSort'),
  eventName?: string(name='EventName'),
  eventConfig?: string(name='EventConfig'),
  status?: string(name='Status'),
  id?: string(name='Id'),
  edgeId?: string(name='EdgeId'),
  XScale?: float(name='XScale'),
  YScale?: float(name='YScale'),
}

model UpdateAbilityConfigByDeviceIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateAbilityConfigByDeviceIdResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateAbilityConfigByDeviceIdResponseBody(name='body'),
}

async function updateAbilityConfigByDeviceIdWithOptions(request: UpdateAbilityConfigByDeviceIdRequest, runtime: Util.RuntimeOptions): UpdateAbilityConfigByDeviceIdResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateAbilityConfigByDeviceId', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateAbilityConfigByDeviceId(request: UpdateAbilityConfigByDeviceIdRequest): UpdateAbilityConfigByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAbilityConfigByDeviceIdWithOptions(request, runtime);
}

model UpdateCorpRequest {
  id?: long(name='Id'),
  corpName?: string(name='CorpName'),
  appName?: string(name='AppName'),
  description?: string(name='Description'),
  iconPath?: string(name='IconPath'),
  corpId?: string(name='CorpId'),
}

model UpdateCorpResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model UpdateCorpResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateCorpResponseBody(name='body'),
}

async function updateCorpWithOptions(request: UpdateCorpRequest, runtime: Util.RuntimeOptions): UpdateCorpResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateCorp', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateCorp(request: UpdateCorpRequest): UpdateCorpResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCorpWithOptions(request, runtime);
}

model UpdateCorpInfoRequest {
  corpId?: string(name='CorpId'),
  corpName?: string(name='CorpName'),
}

model UpdateCorpInfoResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateCorpInfoResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateCorpInfoResponseBody(name='body'),
}

async function updateCorpInfoWithOptions(request: UpdateCorpInfoRequest, runtime: Util.RuntimeOptions): UpdateCorpInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateCorpInfo', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateCorpInfo(request: UpdateCorpInfoRequest): UpdateCorpInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCorpInfoWithOptions(request, runtime);
}

model UpdateDeviceAbilityRequest {
  corpId?: string(name='CorpId'),
  deviceId?: string(name='DeviceId'),
  abilityType?: string(name='AbilityType'),
  abilityName?: string(name='AbilityName'),
  instanceId?: string(name='InstanceId'),
  configInfo?: string(name='ConfigInfo'),
}

model UpdateDeviceAbilityResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateDeviceAbilityResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateDeviceAbilityResponseBody(name='body'),
}

async function updateDeviceAbilityWithOptions(request: UpdateDeviceAbilityRequest, runtime: Util.RuntimeOptions): UpdateDeviceAbilityResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateDeviceAbility', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateDeviceAbility(request: UpdateDeviceAbilityRequest): UpdateDeviceAbilityResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceAbilityWithOptions(request, runtime);
}

model UpdateEdgeDevicesRequest {
  id?: string(name='Id'),
  coprId?: string(name='CoprId'),
  iconPath?: string(name='IconPath'),
  name?: string(name='Name'),
  status?: int32(name='Status'),
  detailJson?: string(name='DetailJson'),
  isDel?: string(name='IsDel'),
}

model UpdateEdgeDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateEdgeDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateEdgeDevicesResponseBody(name='body'),
}

async function updateEdgeDevicesWithOptions(request: UpdateEdgeDevicesRequest, runtime: Util.RuntimeOptions): UpdateEdgeDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateEdgeDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateEdgeDevices(request: UpdateEdgeDevicesRequest): UpdateEdgeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEdgeDevicesWithOptions(request, runtime);
}

model UpdateIpcDeviceRequest {
  deviceSite?: string(name='DeviceSite'),
  corpId?: string(name='CorpId'),
  gbId?: string(name='GbId'),
  bitRate?: string(name='BitRate'),
  deviceDirection?: string(name='DeviceDirection'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceType?: string(name='DeviceType'),
  deviceResolution?: string(name='DeviceResolution'),
  vendor?: string(name='Vendor'),
  deviceName?: string(name='DeviceName'),
}

model UpdateIpcDeviceResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateIpcDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateIpcDeviceResponseBody(name='body'),
}

async function updateIpcDeviceWithOptions(request: UpdateIpcDeviceRequest, runtime: Util.RuntimeOptions): UpdateIpcDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateIpcDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateIpcDevice(request: UpdateIpcDeviceRequest): UpdateIpcDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateIpcDeviceWithOptions(request, runtime);
}

model UpdateUserLibraryByIdRequest {
  corpId?: string(name='CorpId'),
  name?: string(name='Name'),
  identityCard?: string(name='IdentityCard'),
  profession?: string(name='Profession'),
  photo?: map[string]any(name='Photo'),
  id?: string(name='Id'),
}

model UpdateUserLibraryByIdShrinkRequest {
  corpId?: string(name='CorpId'),
  name?: string(name='Name'),
  identityCard?: string(name='IdentityCard'),
  profession?: string(name='Profession'),
  photoShrink?: string(name='Photo'),
  id?: string(name='Id'),
}

model UpdateUserLibraryByIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateUserLibraryByIdResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateUserLibraryByIdResponseBody(name='body'),
}

async function updateUserLibraryByIdWithOptions(tmpReq: UpdateUserLibraryByIdRequest, runtime: Util.RuntimeOptions): UpdateUserLibraryByIdResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateUserLibraryByIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.photo)) {
    request.photoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.photo, 'Photo', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateUserLibraryById', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateUserLibraryById(request: UpdateUserLibraryByIdRequest): UpdateUserLibraryByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserLibraryByIdWithOptions(request, runtime);
}

model UpdateVideoDevicesRequest {
  corpId?: string(name='CorpId'),
  streamUrl?: string(name='StreamUrl'),
  edgeDeviceId?: string(name='EdgeDeviceId'),
  name?: string(name='Name'),
  status?: string(name='Status'),
  detailJson?: string(name='DetailJson'),
  isDel?: string(name='IsDel'),
  id?: string(name='Id'),
}

model UpdateVideoDevicesResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateVideoDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateVideoDevicesResponseBody(name='body'),
}

async function updateVideoDevicesWithOptions(request: UpdateVideoDevicesRequest, runtime: Util.RuntimeOptions): UpdateVideoDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateVideoDevices', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateVideoDevices(request: UpdateVideoDevicesRequest): UpdateVideoDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateVideoDevicesWithOptions(request, runtime);
}

model VerifyDeviceRequest {
  strategy?: string(name='Strategy'),
  cityCode?: string(name='CityCode'),
}

model VerifyDeviceResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      originalGbId?: string(name='OriginalGbId'),
      rowNumber?: long(name='RowNumber'),
      suggestGbId?: string(name='SuggestGbId'),
      code?: string(name='Code'),
      message?: string(name='Message'),
      id?: string(name='Id'),
    }
  ](name='Data'),
}

model VerifyDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: VerifyDeviceResponseBody(name='body'),
}

async function verifyDeviceWithOptions(request: VerifyDeviceRequest, runtime: Util.RuntimeOptions): VerifyDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('VerifyDevice', '2021-03-31', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function verifyDevice(request: VerifyDeviceRequest): VerifyDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyDeviceWithOptions(request, runtime);
}

